import React from 'react';
// 初始化代码样本
import ReactDOM from 'react-dom/client';//react-dom下模块之一，客户端
//? 推荐
//? import ReactDOM from 'react-dom';
import './index.css';
import App from './App';
import reportWebVitals from './reportWebVitals';

//todo 创建根节点,在根节点上渲染组件
const root = ReactDOM.createRoot(document.getElementById('root'));
root.render(
  //? https://blog.csdn.net/wu_xianqiang/article/details/113521191
  // <React.StrictMode>   =>严格模式
    <App />
  // </React.StrictMode>
);

// * react可以在浏览器运行，也可以在服务端渲染

// todo 多数挂载组件
//? import ReactDOM from 'react-dom';
//? 需要删去client
//! ReactDOM.render(<App />, document.getElementById('root'))

// If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals();
